package com.zide.auth.mapper.platform;

import com.zide.auth.domain.entity.platform.PlatformMenu;
import com.zide.auth.domain.entity.platform.PlatformRoleMenu;
import com.zide.common.config.mybatisplus.ZiDeMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author 石添添
 * @description
 * @date 2024-09-10 20:25
 */
@Mapper
public interface PlatformRoleMenuMapper extends ZiDeMapperPlus<PlatformRoleMenu> {
    List<PlatformMenu> selectMenuList(@Param("roleIds") Set<Long> roleIds);

    List<PlatformMenu> selectPlatformMenuList(@Param("userId") Long userId);

    int checkMenuExistRole(@Param("menuId") Long menuId);

    int deleteRoleMenuByRoleId(@Param("id") Long id);

    int batchRoleMenu(List<PlatformRoleMenu> list);

    int deleteRoleMenu(Long[] roleIds);
}
